import request from '@/utils/request'
import type {CartUpdateParams} from "@/types/cart";
export default {
    updateApi: (data:CartUpdateParams) => request({
        url: '/api/sumdc.cart/update',
        method: 'POST',
        data,
        custom: {
            auth: true,
        },
    }),
    indexApi: () => request({
        url: '/api/sumdc.cart/index',
        method: 'GET',
        custom: {
            auth: true,
        },
    }),
    delApi: (data:{cart_ids:string}) => request({
        url: '/api/sumdc.cart/del',
        method: 'POST',
        data,
        custom: {
            auth: true,
        },
    }),
    clearApi: () => request({
        url: '/api/sumdc.cart/clear',
        method: 'POST',
        custom: {
            auth: true,
        },
    })
}